package com.example.controller;

import com.example.service.EbookSnapshotService;
import com.example.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;


@RestController
public class EbookSnapshotController {
    
    @Autowired
    EbookSnapshotService ebookSnapshotService;
    
    @GetMapping("ebookStatistic")
    public Result ebookStatistic(){
        return Result.success(ebookSnapshotService.getStatistic());
    }

    @GetMapping("ebook30DayStatistic")
    public Result ebook30DayStatistic(){
        return Result.success(ebookSnapshotService.get30dayStatistic());
    }

}
